@charset "UTF-8";

@import "lib/global";

/* Pagination */

.pui-pagination {
    color: #666;
    list-style: none;
    font-size: 14px;
    font-size: 1.4rem;
    margin: 0;
    padding: 0;
    position: relative;
    
    @include clearfix();
    
    li {
        *float: left;
        *margin-right: 3px;
        display: inline-block;
        vertical-align: middle;
        
        a, span, input[type="button"] { 
            padding: 0 8px;
            padding: 0 0.76rem;
            padding: 0 0.9rem\9;
            margin-bottom: 5px;
            line-height: 1.8;
            color: #666;
            text-align: center;
            display: inline-block;
        }
        
        input[type="button"] {
            background: #fff;
            border: 1px solid #ddd;
            
            html.no-touch &:hover, &.hover {
                background-color: #fafafa;
            }
        }
        
        a {            
            html.no-touch &:hover, &.hover {
                background: #f6f6f6;                
            }
        
            &.disabled, &.pui-disabled {
                html.no-touch &:hover, &.hover { 
                    background: none;   
                }
            }
        
            &.active, &.pui-active {
                color: #fff;
                cursor: default;
                border-color: $primary-color;
                background: $primary-color;
            }
        }
        
        select {
            *width: 80px;
            padding:0 12px;
            padding:0 1.2rem;
            margin-bottom: 5px;
            font-size: 13px;
            font-size: 1.3rem;
            background-size: 15px;
            background: none\9;
            
            &.unbordered, &.pui-unbordered {
                border: none;
            }
        }
        
        &.pui-input {
            padding-left: 10px;
            padding-left: 1rem;
            padding-right: 10px;
            padding-right: 1rem;
            text-align: center;
        }
        
        input[type="text"], input[type="number"] { 
            width: 40px;  
            text-align: center;
            margin-right: 0;
            padding-top: 4px;
            padding-top: 0.4rem;
            padding-bottom: 4px;
            padding-bottom: 0.4rem;
            font-size: 12px;   
            font-size: 1.2rem;   
            margin-bottom: -1px;       
        }
        
        input[type="number"] { 
            width: 48px;  
        }
    }
    
    &.pui-pagination-bordered {
        li {
            a {
                border: 1px solid #ddd;
                @include border-radius(3px);
                
                &.active, &.pui-active {
                    border-color: $primary-color;                    
                }
            }
            
            input[type="button"] {
                @include border-radius(3px);                
            }
        }
    }
    
    &.pui-pagination-border-square {
        li {
            a, input[type="button"] {
                @include border-radius(0);
            }
        }
    }
    
    &.pui-pagination-left {
        float: left;
    }
    
    &.pui-pagination-right {
        float: right;
    }
    
    &.pui-pagination-circle {
        li {
            a { 
                @include border-radius(500px);
            }
        }        
    }
    
    &.pui-pagination-prev-next {
        li {   
            margin: 0 auto;     
            
            span {
                text-align: center;
                margin: 0 auto;                
            }
            
            &:first-child {
                margin: 0;
                float: left;
            }
            
            &:last-child {
                margin: 0;
                float: right;
            }
        }
            
        > .pui-pagination-nav {
            width: 50%;
            text-align: center;
            position: absolute;
            left: 25%;
            top: 0;
        }
    }
    
    &.pui-pagination-center {
        margin: 0 auto;
        text-align: center;
    }
    
    &.pui-pagination-compact {
        li {
            float:left;
        
            a {
                border-radius: 0;
            }
        }
        
        li + li {
            margin-left: -1px;
        }
    }
}

@media (max-width: 768px) {    
    .pui-pagination {
        li {
            a {
                padding: 0.2rem 1rem 0 1rem; 
            }
            
            select {             
                font-size: 1.4rem;
            }
        }
    }
}
